// 引入 react 依赖
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Text, View, Image, TouchableOpacity, ImageBackground, ScrollView } from 'react-native';

// 引入第三方依赖
import _ from 'lodash';
import pureRender from 'pure-render-decorator';
import { Actions } from 'react-native-router-flux';

// antd 按需加载
import { } from '@ant-design/react-native';

// 引入 处理数据 所需文件
import { } from './module.js'

// 引入样式
import Styles from './style.js';

// 引入公用组件
import { } from '../../components/index.js'

// 引入工具包
import { press, size, ScreenWidth } from '../../util/utils.js'
class IsPay extends Component {
	static propTypes = {

	}

	constructor(props) {
		super(props)
		this.state = {}
	}

	render() {
		const { payInfo, onCancel } = this.props
		if (payInfo.isPay) {
			return (
				<View style={{
					position: 'absolute',
					top: 0,
					left: 0,
					right: 0,
					bottom: 0,
					backgroundColor: 'rgba(0,0,0,.6)',
					alignItems: 'center',
					justifyContent: 'center',
					flexDirection: 'column',
				}}>

					<View style={{
						width: 300,
						backgroundColor: '#fff'
					}}>
						<View style={{
							padding: 15,
							paddingVertical: 30
						}}>
							<Text style={{ fontSize: 16, color: '#333', lineHeight: 26, textAlign: 'center' }}>请确认是否完成支付</Text>
						</View>
						<View style={{
							flexDirection: 'row',
							alignItems: 'center',
						}}>
							<TouchableOpacity
								style={{
									flex: 1,
									paddingVertical: 14,
									paddingHorizontal: 20,
									backgroundColor: '#fff',
									alignItems: 'center',
									justifyContent: 'center',
								}}
								onPress={() => {
									onCancel ? onCancel() : null
								}}
							>
								<Text style={{ fontSize: 16, color: '#f23030', lineHeight: 18, }}>未完成</Text>
							</TouchableOpacity>
							<TouchableOpacity
								style={{
									flex: 1,
									paddingVertical: 14,
									paddingHorizontal: 20,
									backgroundColor: '#fff',
									alignItems: 'center',
									justifyContent: 'center',
								}}
								onPress={() => {
									
								}}
							>
								<Text style={{ fontSize: 16, color: '#333', lineHeight: 18, }}>完成支付</Text>
							</TouchableOpacity>
						</View>
					</View>
				</View>
			)
		} else {
			return null
		}
	}
}

export default pureRender(IsPay)
